UMBC High Performance Computing Facility : Initial Setup of Your Account
This page last changed on Oct 30, 2008 by straha1.
When OIT staff create an account for a user on hpc, certain things are set by default and a certain directory structure created. The purpose of this page is to explicitly list and explain the defaults and particularly to describe and discuss the details of the default directory structure. This discussion should be very useful to understand the ideas behind the setup that was planned with great care collaboratively by the user committee and OIT staff. If you have feedback, suggestions, or questions, do not hesitate to contact the chair of the user committee please. Table of ContentsHostname, operating system, shell, and miscellaneousThe only node with a connection to the outside network is the user node; internally to the system, its full hostname is hpc.cl.rs.umbc.edu (notice the "cl"), but from the outside, its name is hpc.rs.umbc.edu. To log in to the system, you must use a secure shell like ssh from Unix/Linux, PuTTY from Windows, or similar. From anywhere on the internet, a call to ssh under Linux would look like ssh username@hpc.rs.umbc.edu where username is your UMBC username (that you use in myUMBC and that is the base part of your UMBC e-mail address). Your password is your myUMBC password. If your username on your client system is the same as on hpc, you can just say "ssh hpc.rs.umbc.edu", and from within UMBC, you can actually just say "ssh hpc.rs". See also the man page for ssh, "man ssh", for more general information. If you intend to make plots with Matlab or IDL (or do some other graphical work) then you will need to enable X11 forwarding. Usually that is done by adding a -Y flag to your ssh command: ssh -Y username@hpc.rs.umbc.edu If you have an old enough version of ssh, you may have to use -X instead of -Y. Ideally, you should always use -X since it provides improved security, but it breaks many applications (including Matlab) so using it is usually not possible. HPC runs the standard UMBC distribution of the Linux operating system, RedHat Enterprise License 5. We chose the bash as the default shell for users; this will be the shell that you are assumed to be in for purposes of documentation and examples on this webpage; check your shell by saying "echo $SHELL" or by saying "env" and searching for SHELL in the resulting lines of output. Storage Areas and Directory StructureThe directory structure that OIT will set up as part of your account creation is designed to facilitate the work of research groups consisting of several users and also reflects the fact that all accounts on hpc must be sponsored by a faculty member at UMBC. This sponsor will be referred to as PI (for principal investigator) in the following. To give a concrete example, let us assume that you are a student with username "username", who works in the research group of a PI with username "bossname", who sponsors the account. I assume now that the account for the PI has already been created and discuss the example from the standpoint of a new account for the student username being created. OIT will create three areas:
Some research groups have additional storage areas. To find out if you have UMBC research data storage space or other storage space, contact your PI or user support. The tutorial below will show you how to access your home directory, personal scratch space and group common space. For information about other storage areas, or to learn about how your data is stored, see this page: Disk Space and File Quotas. TutorialHome DirectoryNow let's explore these storage areas via a simple tutorial. This tutorial assumes you are a member of a research group. If you are not, then you will have no group scratch space and so those parts of this tutorial will not apply. First, log in to HPC from your local machine via ssh: me@mymachine:~> ssh username@hpc.rs.umbc.edu Password: (type your password) Last login: Wed Nov 01 at 04:03:21 2008 from mymachine.umbc.edu Welcome to hpc.rs.umbc.edu: A weekly hpc.rs cluster maintenance window is reserved for Tuesdays from 6-9pm EST. When downtime is needed, cluster users will be notified via the oit-hpc-users list (email) 5 days in advance, otherwise services will continue uninterrupted. ****************************************************************** * Questions or issues with hpc.rs.umbc.edu should be sent to * * [Old contact info removed]. Please include as much detail about* * your issue as possible. * ****************************************************************** username@hpc:~$ _ At any given time, the directory that you are currently in is referred to as your current working directory. Since you just logged in, your home directory is your current working directory. The ~ represents in the command line (username@hpc:~$) – a ~ is shorthand for your home directory. The program pwd tells you the full path of the current working directory, so let's run pwd to see where your home directory really is: username@hpc:~$ pwd /home/username Now let's use ls to get more information about your home directory. username@hpc:~$ ls -ld ~ drwx------ 23 username pi_bossname 4096 Oct 29 22:35 /home/username The -ld does two things: the l tells ls to use its long output format, and the d tells it to list information about the directory ~ instead of listing the contents of that directory. (Without the d, ls would list the files in your home directory, but not tell us about your home directory itself.) As for the output of ls:
There is a lot of information there, but thankfully you don't have to care about much of it. All you really need to take out of this is that your home directory is /home/username and is accessible by the shorthand ~, and only you can create or view files in your home directory. Unfortunately, you have limited space available in your home directory, and you can see that by running the program quota: username@hpc:~$ quota Disk quotas for user username (uid 12345): Filesystem blocks quota limit grace files quota limit grace /dev/mapper/homevg-homelv 21532 100000 150000 1604 10000 15000 These numbers tell you how much space you're using and how much is available. See our Disk Space and File Quotas page for more information about interpreting those numbers. You are only allowed to create up to 10,000 files that take up a total of 100,000 kB of storage space. That isn't much space and so you need to store some of your data in your scratch and common storage areas. Group Common Storage AreaLet's look at those areas by running this command: username@hpc:~$ ls -l lrwxrwxrwx 1 username pi_bossname 33 Jul 29 15:48 common -> /thumper1/scratch/bossname/common lrwxrwxrwx 1 username pi_bossname 40 Jul 29 15:48 scratch -> /thumper1/scratch/bossname/users/username This time we're telling ls to list information about files in your home directory (since we left out the d in -ld this time). You may see additional files or directories listed if there are already other files or directories in your home directory. The lines output by ls tell us about scratch and common. The l at the beginning of each line tells you that scratch and common are actually symbolic links. The -> /thumper1/scratch/bossname/common tells you where the symbolic link links to. A symbolic link is a way of telling the operating system, "whenever someone accesses ~/common, send them to /thumper1/scratch/bossname/common instead." The common symbolic link links to your group scratch area and the scratch symbolic link links to your personal scratch area. Let's look at each of those. We'll start with common: username@hpc:~$ ls -ld /thumper1/scratch/bossname/common drwxrwsr-x 2 bossname pi_bossname 2 Jul 29 14:56 /thumper1/scratch/bossname/common Some users may see this instead: drwxr-sr-x 2 bossname pi_bossname 2 Jul 29 14:56 /thumper1/scratch/bossname/common Note the r-s instead of rws. The permissions on common are different than the permissions on your home directory:
Again, there is a lot of information there. All you need to remember is that you can create files in the common directory if the permissions say rwxrwsr-x. If they say rwxr-sr-x then only the PI (bossname) can create or delete files. Configuring Permissions of the Group Common Storage Area (PI Only)If you are a PI, you can add or remove the group write permissions (the w in r-s/rws) by using the chmod command. To add group write permissions (the w) and let all members of your group create or delete files and directories in your groups common directory: bossname@hpc:~$ chmod g+w ~/common/ To remove group write permissions so that only you, the PI bossname, can create or delete files in your group's common directory: bossname@hpc:~$ chmod g-w ~/common/ You could, of course, use the full path to ~/common/ in those commands: /thumper1/scratch/bossname/common. Personal Scratch AreaNow lets look at your personal scratch area. username@hpc:~$ ls -ld /thumper1/scratch/bossname/users/username drwxr-sr-x 3 username pi_bossname 3 Sep 21 21:59 /thumper1/scratch/bossname/users/username Since the permissions are drwxr-sr-x, only the owner of the directory (you: username) can create or delete files in that directory, but anyone in the group (your research group pi_bossname) can list the contents of the directory or cd to it. The full path to your scratch and common directories might not be /thumper1/scratch/bossname/users/username and /thumper1/scratch/bossname/common. If you have no PI sponsoring you (such as if you are on HPC for a class), your personal scratch space is /thumper1/scratch/general/users/username and you have no common group scratch space. How to Create Simple Files and DirectoriesNow let's try creating some files and directories. First, let's make a directory named "testdir" in your home directory: username@hpc:~$ mkdir testdir username@hpc:~$ ls -ld testdir drwxr-x--- 2 username pi_bossname 4096 Oct 30 00:12 testdir username@hpc:~$ cd testdir username@hpc:~/testdir$ _ The mkdir command created the directory testdir. Since your current working directory was ~ when you ran that command, testdir is inside your home directory. Thus it is said to be a subdirectory of ~. The cd command changed your working directory to ~/testdir and that is reflected by the new prompt: username@hpc:~/testdir$. Now lets create a file in testdir: username@hpc:~/testdir$ echo HELLO WORLD > testfile straha1@hpc:~/testdir$ ls -l testfile -rw-r----- 1 username pi_groupname 12 Oct 30 00:16 testfile username@hpc:~/testdir$ cat testfile HELLO WORLD username@hpc:~/testdir$ cat ~/testdir/testfile HELLO WORLD username@hpc:~/testdir$ _ The echo command simply prints out its arguments ("HELLO WORLD"). The "\>" tells your shell to send the output of echo into the file testfile. Since your current working directory is ~/testdir, testfile was created in testdir and its full path is then ~/testdir/testfile. The program cat prints out the contents of a file (where the argument to cat, testfile or ~/testdir/testfile is the file to print out). As you can see, testfile does indeed contain "HELLO WORLD". Now let's delete testdir and testfile. You cannot delete a directory if it contains files, so we must delete testfile first: straha1@hpc:~/testdir$ rm -i testfile rm: remove regular file `testfile'? y Now we delete the testdir directory: straha1@hpc:~/testdir$ cd ~ straha1@hpc:~$ rmdir testdir |
Document generated by Confluence on Mar 31, 2011 15:37 |